package user;

import opera.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DickYang
 * Date: 2023-05-28
 * Time: 10:39
 */
public class AdminUser extends User {
    public AdminUser(String name) {
        super(name);
        super.ioPerations = new IOPeration[] {new ExitOperation(),
                                            new ShowOperation(),
                                            new FindOperation(),
                                            new DelOperation(),
                                            new AddOperation()};
    }
    @Override
    public int menu() {
        System.out.println("********************************");
        System.out.println("欢迎 " + name+" 来到图书小练习!");
        System.out.println("1.显示图书!");
        System.out.println("2.查找图书!");
        System.out.println("3.删除图书!");
        System.out.println("4.新增图书!");
        System.out.println("0.退出系统!");
        System.out.println("********************************");
        System.out.println("请选择:");
        Scanner scanner = new Scanner(System.in);
        int chiose  = scanner.nextInt();
        return chiose;

    }
}
